<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户列表</title>
  <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<style>
 a{
   color: #fff;
 }
 h1{
   text-align: center;
 }
 .add{
   float: left;
 }
 .find{

   float: right;
 }
 .find1{
   float: left;
 }
 .find2{
   float: left;
   color: #ffffff;
 }
 .find2 input{
   border:none;//去除边框
   border-radius:0;
   border-bottom:#8D8D8D 1px solid;
   box-shadow: 0px 0px 0px 0px;//去除阴影
 }
</style>
<body>
  <h1>Spring-boot</h1>
  <div class="head">
  <div class="add">
    <button style="width: 100px" class="btn btn-block"><a href="/useradd">添加用户</a> </button>
  </div>
  <div class="find">

    <form th:action="@{/finduser}" method="post">
      <div class="find1">
      <input class="form-control"  type="text" name="id">
      </div>
      <div class="find2">
        <input type="submit"  value="查询" style="height: 35px;background-color: #337ab6">
      </div>
    </form>


  </div>
  <table class="table table-striped table-bordered table-hover text-center">
    <thead>
    <tr style="text-align:center">
      <th>编号</th>
      <th>姓名</th>
      <th>密码</th>
      <th>全名</th>
      <th>电话</th>
      <th>操作</th>
    </tr>
    </thead>

    <tr th:each="users:${users}" style="text-align:center">
      <td th:text="${users.id}" ></td>
      <td th:text="${users.username}"></td>
      <td th:text="${users.password}"></td>
      <td th:text="${users.fullname}"></td>
      <td th:text="${users.mobile}"></td>
      <td>
        <a class="btn btn-primary" th:href="@{'/updatePage/'+${users.id}}">更改</a>
        <a class="btn btn-danger" th:href="@{'/delete/'+${users.id}}">删除</a>
      </td>
    </tr>
  </table>

    <button class="btn btn-block"><a href="/exit">退出</a> </button>
</body>
</html>